﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TianYu.Pages.Data
{
    /// <summary>
    /// DataMining.xaml 的交互逻辑
    /// </summary>
    public partial class DataMining : Page
    {
        public DataMining()
        {
            InitializeComponent();
            this.DataContext = this;
        }

        public ICommand SelectPage => new RelayCommand(c =>
        {
            switch (c)
            {
                case "上交所":
                    dataFrame.Source = new Uri($"/Pages/Data/SHSE_Data.xaml", UriKind.Relative);
                    break;
                case "深交所":
                    dataFrame.Source = new Uri($"/Pages/Data/SZSE_Data.xaml", UriKind.Relative);
                    break;
                case "北交所":
                    dataFrame.Source = new Uri($"/Pages/Data/BJSE_Data.xaml", UriKind.Relative);
                    break;
                default:
                    dataFrame.Source = new Uri($"/Pages/Data/SHSE_Data.xaml", UriKind.Relative);
                    break;
            }
        });
    }
}
